<?php
/**
 * User: tridungpham
 * Date: 7/6/11
 * Time: 8:39 PM
 */
 
class ModulesModel extends Model
{
    function __construct()
    {
        $this->loadTable('modules');
    }

    function getModuleList()
    {
        return $this->tables['modules']->get();
    }

    function getModule($id)
    {
        return $this->tables['modules']->get(array('id' => $id));
    }

    function handleUpdateDetail($id)
    {
        $this->tables['modules']->set('status',$_POST['status']);
        $this->tables['modules']->update(array('id' => $id));
    }
}